<?php
/**
 * 
 * @author truonghm
 * @copyright http://officex.vn
 * @package Role
 * @Created date: 31/3/2011
 *
 */
abstract class Role_Models_Interface_Role {
	
	abstract protected function doUpdate($json);
	abstract protected function doUpdateRolePrivileges($json);
	
	abstract protected function doInsert($json);
	
	abstract protected function doDelete($role_id);
	
	abstract protected function doGetList($json);
	abstract protected function doGetPrimarykey($role_id);
	abstract protected function doGetRolePrivileges($role_id);
	
	abstract protected function doGetRolePrivilege();
	
	public function getRolePrivilege(){
		 $result = $this->doGetRolePrivilege();
		 return $result;
	}
	
	/**
	 * @author truonghm
	 * @created: 04/04/2011
	 * Get danh sach role
	 */
	public function getList($json){
		 $result = $this->doGetList($json);
		 return $result;
	}
	
	public function update($json){
		 $result = $this->doUpdate($json);
		 return $result;
	}
	
	public function insert($json){
		 $result = $this->doInsert($json);
		 return $result;
	}
	
	public function delete($role_id){
		 $result = $this->doDelete($role_id);
		 return $result;
	}
	
	public function primarykey($role_id)
    {
    	$result = $this->doGetPrimarykey($role_id);
    	return $result;
    }
    
	public function getRolePrivileges($role_id)
    {
    	$result = $this->doGetRolePrivileges($role_id);
    	return $result;
    }
    
	public function updateRolePrivileges($json)
    {
    	$result = $this->doUpdateRolePrivileges($json);
    	return $result;
    }
    
}